import Vue from 'vue'
import VueRouter from 'vue-router'
import Layout from '@/views/layout'
import My from '@/views/my'
import Zhaof from '@/views/zhaof'
import Zxu from '@/views/zxu'
import Shouye from '@/views/shouye'
import Login from '@/views/login'
import Register from '@/views/register'
import MyHousingManagement from '@/views/MyHousingManagement'
import Collect from '@/views/collect'
import City from '@/views/City'
import Xianqing from '@/views/xianqing'
Vue.use(VueRouter)

// const routes = [

// ]

const router = new VueRouter({
  routes: [
    {
      path: '/login',
      component: Login
    },
    {
      path: '/register',
      component: Register
    },
    {
      path: '/',
      component: Layout,
      redirect: 'shouye',
      children: [

        {
          path: '/my',
          component: My
        },
        {
          path: '/zxu',
          component: Zxu
        },
        {
          path: '/zhaof',
          component: Zhaof
        },
        {
          path: '/shouye',
          component: Shouye
        }

      ]
    },
    {
      path: '/collect',
      component: Collect
    },
    {
      path: '/myHousingmanagement',
      component: MyHousingManagement
    },
    {
      path: '/city', // 城市列表
      component: City
    },
    {
      path: '/xianqing',
      component: Xianqing
    }

  ]
})

export default router
